/*!
 * @author Isis (igraziatto) Graziatto <isis.g@vanillaforums.com>
 * @copyright 2009-2018 Vanilla Forums Inc.
 * @license GPL-2.0-only
 */

/* -------------------------------------------------------------- *\
    Variables
\* -------------------------------------------------------------- */

$count_fontWeight: inherit !default;
$count_fontSize: $global-small_fontSize !default;
$count_borderRadius: 3px !default;
$count_height: $formButton_height !default;
$count_bg: transparent !default;
$count_border: 0 !default;
$count_color: inherit !default;

$count-hover_bg: transparent !default;
$count-hover_borderColor: transparent !default;
$count-hover_color: inherit !default;

@mixin Count {
    background-color: $count_bg;
    color: $count_color;
    border-color: darken($count_bg, 8%);
    border: $count_border;
    border-radius: $count_borderRadius;

    font-size: $count_fontSize;
    line-height: $global-base_lineHeight;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    font-weight: $count_fontWeight;
    justify-content: center;

    @if $count_bg == transparent {
        padding: 0;
    } @else {
        padding: 0 $utility-baseUnit;
    }

    @if ($count_borderRadius == $count_height) {
        min-width: $count_height;
    }
}

/* -------------------------------------------------------------- *\
    Styles
\* -------------------------------------------------------------- */

// Reset margins
.Aside {
    margin: 0;
}

.Count,
.Alert,
.Reactions .Count {
    @include Count;
}

a:focus,
a:hover {
    .Count,
    .Reactions .Count {
        background-color: $count-hover_bg;
        color: $count-hover_color;
        border-color: $count-hover_borderColor;
    }
}
